import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: yang
 * Date: 2022-05-07
 * Time: 13:03
 */
public class Main {
    public static int find(int []arr,int target){
        for (int i = 0; i < arr.length; i++) {
            if(arr[i]==target){
                return i;
            }
        }
        return -1;
    }
    public static void main(String[] args) {
        int[] nums = new int[100];
        int[] ans = new int[2];
        int size = 0;
        int target;
        Scanner scan = new Scanner(System.in);
        size = scan.nextInt();
        target = scan.nextInt();
        for (int i = 0; i < size; i++) {
            nums[i] = scan.nextInt();
        }

        int []copy = nums.clone();
        for (int i = 0; i < size; i++) {
            copy[i]=target-copy[i];
            int index=find(nums,copy[i]);
            if(index != -1 && copy[i]*2!=target){
                ans[0]=index;
                ans[1]=i;
            }
        }

        String str = Arrays.toString(ans);
        System.out.println(str);
    }
}
